extends ../layout

block content
  style
    include index.css
  h1= title
  table(border="1" cellspacing="0")
    thead
      tr
        each item in ['项目名称', '创建时间', '操作']
          th #{item}
    tbody
      each item in list
        tr
          each key in ['name', 'createtime']
            td #{item[key]}
          td
            a.btn.btn-primary(href="/project/" + item.id) 查看
            a.btn.btn-primary(href="/project/delete?projectId=" + item.id style="margin-left: 10px;") 删除

  div
    a.btn.btn-primary(href="/project/add") 添加项目
    a.btn.btn-primary(href="/home" style="margin-left: 10px;") 返回首页
  script
    include index.js